<?php
if (isset($this->add) && !empty($this->add)) {
    $itemAdded = $this->add;
    foreach ($itemAdded['controllers'] as $controller ) { ?>
        <p>Se agrego el controlador <strong><?php echo $controller; ?></strong></p>
        <?php
        if (array_key_exists($controller,$itemAdded['actions'])){ 
            $action = $itemAdded['actions'][$controller][0];
            unset($itemAdded['actions'][$controller]);
            ?>
            <p>Se agrego la accion <strong><?php echo $action; ?></strong> del controllador <strong><?php echo $controller; ?></strong></p>
        <?php }
    }
    foreach ($itemAdded['actions'] as $controller => $arrayAction ) {
        foreach ($arrayAction as $action) { ?>
            <p>Se agrego la accion <strong><?php echo $action; ?></strong> del controlador <strong><?php echo $controller; ?></strong></p>
            <?php
        }
     }
}

if (isset($this->delete) && !empty($this->delete)) {
    $itemDeleted = $this->delete;
    foreach ($itemDeleted['controllers'] as $controller ) { ?>
        <p>Se elimino el controlador <strong><?php echo $controller; ?></strong></p>
        <?php
        if (array_key_exists($controller,$itemDeleted['actions'])){
            $action = $itemDeleted['actions'][$controller][0];
            unset($itemDeleted['actions'][$controller]);
            ?>
            <p>Se elimino la accion <strong><?php echo $action; ?></strong> del controllador <strong><?php echo $controller; ?></strong></p>
        <?php }
    }
    foreach ($itemDeleted['actions'] as $controller => $arrayAction ) {
        foreach ($arrayAction as $action) { ?>
            <p>Se elimino la accion <strong><?php echo $action; ?></strong> del controlador <strong><?php echo $controller; ?></strong></p>
            <?php
        }
     }
}
?>